package com.karal.javase.cher03;

/**
 * @TODO
 * @Author xu
 * 2025/3/6
 */
public class Main {
    public static void main(String[] args) {
        Computer computer = new Computer();

        StorageDevice usbDrive = new USBDrive();
        System.out.println("使用U盘:");
        computer.exchangeData(usbDrive);

        System.out.println("\n使用MP3播放器:");
        StorageDevice mp3Player = new MP3Player();
        computer.exchangeData(mp3Player);

        System.out.println("\n使用移动硬盘:");
        StorageDevice externalHardDrive = new ExternalHardDrive();
        computer.exchangeData(externalHardDrive);
    }
}
